<#assign getText=localizedTextContext.getText>
<#assign getIntText=localizedTextContext.getIntText>
<#assign getLongText=localizedTextContext.getLongText>
<#-- html -->
<#macro html>
	<!DOCTYPE html>
	<html>
		<#nested>
	</html>
</#macro>

<#-- head -->
<#macro head import=false title='' editor=false upload=false draggable=false dateRange=false typeahead=false>
	<head>
		<!-- 字体 -------------------------------------------------------------------------------------------->
		<meta charset="UTF-8" />
		
		<!-- ie -------------------------------------------------------------------------------------------->
		<meta http-equiv="X-UA-Compatible" content="IE=edge;chrome=1" />
		
		<!-- 缓存关闭 ----------------------------------------------------------------------------------------->
		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<title>${title}</title>
		<#if import>
		<script type="text/javascript">
    	var PROJECT_HOME="${base}";
    	</script>
		<!-- js -------------------------------------------------------------------------------------------->
		<!-- jquery -->
		<!--[if lt IE 9]>
		<script type="text/javascript" src="${base}/js/bfsu-bs/jquery/jquery-1.11.0.min.js"></script>
		<![endif]-->
		<!--[if gte IE 9]>
		<script type="text/javascript" src="${base}/js/bfsu-bs/jquery/jquery-2.1.0.min.js"></script>
		<![endif]-->
		<!--[if !IE]><!-->
		<script type="text/javascript" src="${base}/js/bfsu-bs/jquery/jquery-2.1.0.min.js"></script>
		<!--<![endif]-->
		
		<!-- bootstrap ------------------------------------------------------------------------------------------>
		<!-- 禁用缩放 -->
		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
		<link rel="stylesheet" href="${base}/ace/assets/css/bootstrap.css">
		<script src="${base}/ace/assets/js/bootstrap.js"></script>
		<link rel="stylesheet" href="${base}/ace/assets/css/font-awesome.css" />

		<!-- text fonts -->
		<link rel="stylesheet" href="${base}/ace/assets/css/ace-fonts.css" />

		<!-- ace styles -->
		<link rel="stylesheet" href="${base}/ace/assets/css/ace.css" />

		<!--[if lte IE 9]>
			<link rel="stylesheet" href="${base}/ace/assets/css/ace-part2.css" />
		<![endif]-->
		<link rel="stylesheet" href="${base}/ace/assets/css/ace-rtl.css" />

		<!--[if lte IE 9]>
		  <link rel="stylesheet" href="${base}/ace/assets/css/ace-ie.css" />
		<![endif]-->

		<!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->

		<!--[if lt IE 9]>
		<script src="${base}/ace/assets/js/html5shiv.js"></script>
		<script src="${base}/ace/assets/js/respond.js"></script>
		<![endif]-->
		<!--[if lte IE 8]>
		  <script src="${base}/ace/assets/js/excanvas.js"></script>
		<![endif]-->
	    <script src="${base}/ace/assets/js/ace/ace.js"></script>
	    <script src="${base}/ace/assets/js/ace-extra.js"></script>
		<script src="${base}/ace/assets/js/ace/ace.ajax-content.js"></script>
		<script src="${base}/ace/assets/js/ace/ace.touch-drag.js"></script>
		<script src="${base}/ace/assets/js/ace/ace.submenu-hover.js"></script>
    	<script src="${base}/ace/assets/js/ace/ace.sidebar.js"></script>
    	<script src="${base}/ace/assets/js/ace/ace.sidebar-scroll-1.js"></script>
    	
    	<link rel="stylesheet" href="${base}/ace/assets/css/jquery.gritter.css">
    	<script src="${base}/ace/assets/js/jquery.gritter.js"></script>
    	
		<!-- multiselect.js -->
		<link rel="stylesheet" href="${base}/ace/assets/css/bootstrap-multiselect.css">
		<script type="text/javascript" src="${base}/ace/assets/js/bootstrap-multiselect.js"></script>

		<!-- datetimepicker.js -->
		<link rel="stylesheet" href="${base}/js/bfsu-bs/datetimepicker/css/bootstrap-datetimepicker.min.css">
		<script type="text/javascript" src="${base}/js/bfsu-bs/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>


		
		<!-- validation.js -->
		<script type="text/javascript" src="${base}/js/bfsu-bs/bootstrap3-validation.js"></script>
		<script type="text/javascript" src="${base}/js/bfsu-bs/bfsu.bs.js"></script>
		<!-- combobox.js -->
		<link rel="stylesheet" href="${base}/js/bfsu-bs/combobox/css/bootstrap-combobox.css">
		<script type="text/javascript" src="${base}/js/bfsu-bs/combobox/js/bootstrap-combobox.js"></script>
		
		<!--jquery validate
		<script src="${base}/ace/assets/js/jquery.validate.js"></script>
		<script src="${base}/ace/assets/js/additional-methods.js"></script>-->
		</#if>
		

    	

		<#if editor?exists && editor>
	    <script type="text/javascript" src="${base}/js/ueditor1_4_2/ueditor.config.js" ></script>
	    <script type="text/javascript" src="${base}/js/ueditor1_4_2/ueditor.all.min.js" ></script>
	    <script type="text/javascript" src="${base}/js/ueditor1_4_2/third-party/fill/fill.js" ></script>
	    <link rel="stylesheet" type="text/css" href="${base}/js/ueditor1_4_2/third-party/fill/fill.css">
	    </#if>
	    
	    <#if upload?exists && upload>
	    <link href="${base}/style/fileuploader/fileuploader.css" rel="stylesheet" type="text/css">
	    <script type="text/javascript" src="${base}/js/fileuploader/fileuploader.js"></script>
	    </#if>
	    
	    <#if draggable?exists && draggable>
	    	<script src="${base}/ace/assets/js/jquery-ui.js"></script>
	    </#if>
	    
	    <#if dateRange?exists && dateRange>
	    	<link rel="stylesheet" href="${base}/ace/assets/css/datepicker.css" />
	    	<script src="${base}/ace/assets/js/date-time/bootstrap-datepicker.js"></script>
	    </#if>
	    
	    <#if typeahead?exists && typeahead>
	    	<script src="${base}/ace/assets/js/typeahead.jquery.js"></script>
	    	<script src="${base}/ace/assets/js/ace/elements.typeahead.js"></script>
	    </#if>
	    <script src="${base}/ace/assets/js/jquery.easypiechart.js"></script>
	    
	    <link rel="stylesheet" href="${base}/ace/assets/css/bootstrap-editable.css" />
		<script src="${base}/ace/assets/js/x-editable/bootstrap-editable.js"></script>
		<script src="${base}/ace/assets/js/x-editable/ace-editable.js"></script>

	    <script src="${base}/ace/assets/js/fuelux/fuelux.wizard.js"></script>
	    <script src="${base}/ace/assets/js/ace/elements.wizard.js"></script>
	    
	    <script src="${base}/ace/assets/js/ace/ace.sidebar.js"></script>
		<script src="${base}/ace/assets/js/ace/ace.sidebar-scroll-1.js"></script>
	    
	    
		<script src="${base}/ace/assets/js/fuelux/fuelux.spinner.js"></script>
		<script src="${base}/ace/assets/js/ace/elements.spinner.js"></script>
	    <script src="${base}/ace/assets/js/ace/ace.widget-box.js"></script>
	    
		<#nested>
	</head>
</#macro>

<#-- body
	body的封装
	top		是否显示页头导航条，默认为false
	foot	是否显示页脚，默认为false
-->
<#macro body head=false foot=false class="">
	<body style="margin-bottom:50px" class="${class}">
		<#if head><@bshead/></#if>
		<#nested/>
		<#if foot><@bsfoot/></#if>
	</body>
</#macro>

<#-- bshead
	页头，也就是页面顶部导航条
	pos		位置，默认为top
	sname	logo或者文字
	shref	点击logo跳转的地址
-->
<#macro bshead pos='top' sname='' shref=''>
	<div id="navbar" class="navbar navbar-default navbar-fixed-top">
			<script type="text/javascript">
				try{ace.settings.check('navbar' , 'fixed')}catch(e){}
				function showSidebar(sidebar_id){
					$("#bscenter").html("");
					$(".sidebar").hide();
					if(sidebar_id){
						$("#"+sidebar_id).show();
					}
				}
			</script>

			<div class="navbar-container" id="navbar-container">
				<!-- #section:basics/sidebar.mobile.toggle -->
				<button type="button" class="navbar-toggle menu-toggler pull-left" id="menu-toggler" data-target="#sidebar">
					<span class="sr-only">Toggle sidebar</span>

					<span class="icon-bar"></span>

					<span class="icon-bar"></span>

					<span class="icon-bar"></span>
				</button>

				<!-- /section:basics/sidebar.mobile.toggle -->
				<div class="navbar-header pull-left">
					<!-- #section:basics/navbar.layout.brand -->
					<a href="${shref}" class="navbar-brand">
						<small>
							<i class="fa fa-leaf"></i>
							${sname}
						</small>
					</a>
				</div>
					<ul class="nav navbar-nav">
                        <#-- 获取 session 中的登录信息对象 -->

						<#list headmenus as menu>
							
							<#if (!roleCodes?exists)  || roleCodes?size == 0 ||(roleCodes?exists && SecurityContext.hasMenu(menu,roleCodes))>
							<li >
								<#if menu.subMenus?exists && menu.subMenus?size gt 0>
								<a href="javascript:showSidebar(${menu.id});">${menu.title}</span></a>
								
								<#else>
								<a href="javascript:showSidebar(${menu.id});bfsu.html('${base}${menu.url!''}', null, '${menu.title!''}');" >${menu.title!''}</a>
								</#if>
							</li>
							</#if>
						</#list>
					</ul>

				
				<!-- #section:basics/navbar.dropdown -->
					<ul class="nav ace-nav navbar-right">
						
						

						<!-- #section:basics/navbar.user_menu -->
						<li class="light-blue">
							<a data-toggle="dropdown" href="#" class="dropdown-toggle">
								<img class="nav-user-photo" src="${base}/ace/assets/avatars/user.jpg" alt="Jason's Photo" />
								<span class="user-info">
									<small>Welcome,</small>
									${loginInfo.userName}
								</span>

								<i class="ace-icon fa fa-caret-down"></i>
							</a>

							<ul class="user-menu dropdown-menu-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
								<li>
									<a href="#" onclick="bfsu.edit('${base}/index/modifyPwdPre','修改密码');">
										<i class="ace-icon fa fa-cog"></i>
										修改密码
									</a>
								</li>

								<li>
									<a href="#" onclick="bfsu.edit('${base}/index/personalInfoPre','修改个人信息');">
										<i class="ace-icon fa fa-cog"></i>
										修改个人信息
									</a>
								</li>

								<li class="divider"></li>

								<li>
									<a href="${base}/login/logout">
										<i class="ace-icon fa fa-power-off"></i>
										退出系统
									</a>
								</li>
							</ul>
						</li>

						<!-- /section:basics/navbar.user_menu -->
					</ul>

			</div><!-- /.navbar-container -->
		</div>
</#macro>

<#-- bsfoot
	页脚，网页的页脚
	height	高度
	color	背景色
	content	显示的内容
-->
<#macro bsfoot height='60' color='#f5f5f5' content='xyl'>
	<#--<@row>
	<div class="footer" style="width:100%;height:${height}px;background-color:${color};text-align:center;position:fixed;bottom:0;z-index:99">
		<div class="container">
			<p class="text-muted" style="margin: 20px 0;">
				<a target="_blank" href="http://www.ebeiwai.com/" >${getText(content)}</a>
			</p>
		</div>
	</div>
	</@row>-->
	
</#macro>

<#-- nail
	缩略图，也就是页面的小块，可以放图片以及文字说明
	src		图片地址
	alt		图片提示
	title	文字标题
	desc	文字描述
-->
<#macro nail src='' alt='' title='' desc=''>
	<div class="col-xs-12 col-sm-12 col-md-4 col-lg-4" style="text-align:center;">
		<div class="thumbnail" style="height:190px;">
			<#if src != ''>
				<img src="${src}" alt="${alt}">
			</#if>
			<div class="caption">
				<#if title != ''><h1>${title}</h1></#if>
				<#if desc != ''><p>${desc}</p></#if>
				<p><#nested></p>
			</div>
		</div>
	</div>
</#macro>

<#-- lun 
	轮播组件，页面显示大图片轮播
	pics	图片名称，会寻找{base}/style/fore/images/${pic}.jpg
-->
<#macro lun pics...>
	<div id="carousel-example-generic" class="carousel slide" data-ride="carousel">
		<!-- Indicators -->
		<ol class="carousel-indicators">
			<#list pics as pic>
				<li data-target="#carousel-example-generic" data-slide-to="${pic_index}" <#if pic_index == 0>class="active"</#if>></li>
			</#list>
		</ol>
		
		<!-- Wrapper for slides -->
		<div class="carousel-inner" role="listbox">
			<#list pics as pic>
				<div class="item <#if pic_index == 0>active</#if>">
					<img src="${base}/style/fore/images/${pic}.jpg" alt="${pic}">
				</div>
			</#list>
		</div>
		
		<!-- Controls -->
		<a class="left carousel-control" href="#carousel-example-generic" role="button" data-slide="prev">
			<span class="glyphicon glyphicon-chevron-left"></span>
			<span class="sr-only">Previous</span>
		</a>
		<a class="right carousel-control" href="#carousel-example-generic" role="button" data-slide="next">
			<span class="glyphicon glyphicon-chevron-right"></span>
			<span class="sr-only">Next</span>
		</a>
	</div>
</#macro>


<#-- row 
	row封装，和container配套使用
	fit	是否填充满container，默认为false
	id		id
	data	一些数据可以放到这里，通过js读取
-->
<#macro row fit=true id='' data=''>
	<div class="row<#if fit>-fluid</#if>" <#if id != ''>id="${id}"</#if> <#if data != ''>data="${data}"</#if>>
		<#nested>
	</div>
</#macro>

<#-- 
colnum 
这个布局相关，因为涉及到四种设备，所以还是手动写比较好
col-xs-12 col-sm-12 col-md-12 col-lg-12
-->

<#macro col tabs=false class=''  id='' url=''>
	<div <#if class != ''>class="${class}"</#if> <#if id != ''>id="${id}"</#if>>
		<#if url!="">
			<script>
				$(function(){
					$.post('${url}',{},function(result){
					    $("#${id}").html(result);
					 });
				});
			</script>
		<#else>
			<#nested>
		</#if>
	</div>
</#macro>

<#-- nav -->
<#macro nav navs...>
	<#assign navList=navs>
</#macro>

<#--------------------------------------------组件----------------------------------------->
<#-- panel
	panel封装
	title	panel的标题 
-->
<#macro panel title="">
	<div class="panel panel-default" style="height:100%;">
		<#if title!=''><div class="panel-heading">${title}</div></#if>
		<div class="panel-body">
			<#nested>
		</div>
	</div>
</#macro>

<#-- table 
	表格封装
-->
<#macro table>
	<div class="table-responsive">
		<table class="table table-striped table-bordered table-hover">
			<#nested>
		</table>
	</div>
</#macro>

<#-- bsicon 
	图标封装
	icon	具体的图标，可以查阅官方文档
-->
<#macro bsicon icon=''>
	<#if icon != ''>
		<span class="glyphicon glyphicon-${icon}"></span>
	</#if>
</#macro>

<#-- button 
	按钮
	type	类型，用来显示不同的颜色
	size	按钮大小
	icon	按钮图标
	onclick	点击事件
-->
<#macro button type="default" size='' icon='' onclick='' disabled='' function=''>
	<button type="button" class="btn btn-${type} <#if size != ''>btn-${size}</#if>" <#if onclick != ''>onclick="${onclick}"</#if>
			<#assign showFunction = false>
			<#if functions?exists>
			<#list functions as item>
			<#if item??>
			<#if item.privilege.code == '${function}'><#assign showFunction = true></#if>
			</#if>
			</#list>

			<#if "${function}" != "">
			<#if showFunction == true>
			<#if disabled != ''>disabled="${disabled}"</#if>
			<#else>
			disabled="disabled"
			</#if>
			</#if>
			</#if>

		<@bsicon icon=icon/>
		<#nested>
	</button>
</#macro>

<#-- formgroup -->
<#macro formgroup  inc=true type='text' title='title' name='name' value='' widthleft=3 widthdata=5>
	<#if inc>
		<@row>
		<div class="form-group">
			<label class="control-label col-xs-${widthleft} col-sm-${widthleft} col-md-${widthleft} col-lg-${widthleft}">${title}：</label>
			<div class="col-xs-${widthdata} col-sm-${widthdata} col-md-${widthdata} col-lg-${widthdata}">
			    	<#nested>
			</div>
		</div>
		</@row>
	<#else>
		<@row>
			<div class="form-group">
				<label for="id-${name}" class="control-label col-xs-${widthleft} col-sm-${widthleft-1} col-md-${widthleft-1} col-lg-${widthleft-1}">${title}：</label>
				<div class="col-xs-${12-widthleft} col-sm-${12-widthleft+1} col-md-${12-widthleft+1} col-lg-${12-widthleft+1}">
					<input type="${type}" name="${name}" value="${value}" placeholder="${title}" class="form-control" id="id-${name}">
				</div>
			</div>
		</@row>
	</#if>
</#macro>

<#-- querygroup -->
<#macro querygroup title='title' >
	<div class="form-group">
		<div class="input-group">
			<div class="input-group-addon">${title}：</div>
			<#nested>
		</div>
	</div>
</#macro>

<#--
下拉列表框
    name                名称
    value               值
    list                集合
    listKey=''          选项内容对应的方法名
    listValue=''        选项的值对应的方法名
    headerKey=''        头选项的显示
    headerValue=''      头选项的值
    emptyOption=false   包含一个空的选项
    id=''               ID
    class=''            样式表
    style=''            样式
    title=''            提示信息
    disabled=false      不可用
    size=-1             显示数量
    tabindex=-1         tab顺序
-->
<#macro select name list value='' listKey='' listValue='' headerKey='' headerValue='' emptyOption=true id='' class='' style='' title='' disabled=false size=-1 tabindex=-1 onChange='' checkType='' sortBy='' multi=false search=true extra=''>

    <select <#if multi> multiple="multiple" </#if> name="${name}"<#if id?exists && id!=''> id="${id}"</#if> <#if class?exists && class!=''> class="${class}<#if multi> multiselect</#if>"<#else>class="multiselect"</#if>  <#if style?exists && style!=''> style="${style}"</#if> <#if checkType?exists && checkType!=''> check-type="${checkType}"</#if> <#if title?exists && title!=''> title="${title}"</#if><#if size gt 0> size="${size}"</#if><#if disabled> disabled="disabled"</#if><#if tabindex gt 0> tabindex="${tabindex}"</#if> <#if onChange?exists && onChange!=''>onChange='${onChange}'</#if> >
    
    
    <#if headerKey?exists && headerKey!=''>
        <option value="${headerValue}"<#if headerValue==value> selected="selected"</#if> >${headerKey}</option>
    <#else>
    
    	<#if emptyOption&&multi=false>
        <option value="">请选择</option>
        </#if>
    </#if>
    <#if sortBy?exists&&sortBy!=''>
	    <#if listKey?exists && listKey!='' && listValue?exists && listValue!=''>
	    <#if list?? && list?size gt 0>
	        <#list list?sort_by(sortBy) as item>
	            <#assign itemTitle=item[listKey]>
	            <#assign itemValue=item[listValue]>
	        <option value="${itemValue}" <#if itemValue == value> selected="selected"</#if> >${itemTitle}</option>
	        </#list>
	        </#if>
	    <#elseif list?is_hash && !list?is_collection>
	        <#list list?sort_by(sortBy)?keys as key>
	            <#assign itemTitle=key>
	            <#assign itemValue=list[key]>
	        <option value="${itemValue}" <#if itemValue == value> selected="selected"</#if> >${itemTitle}</option>
	        </#list>
	    <#else>
	        <#list list?exists?sort_by(sortBy) as item>
	            <#assign itemTitle=getText(item?string)>
	            <#assign itemValue=item>
	        <option value="${itemValue}" <#if itemValue == value> selected="selected"</#if> >${itemTitle}</option>
	        </#list>
	    </#if>
    <#else>
    	<#if listKey?exists && listKey!='' && listValue?exists && listValue!=''>
	        <#list list?exists as item>
	            <#assign itemTitle=item[listKey]>
	            <#assign itemValue=item[listValue]>
	            <#if extra!=''><#assign itemExtra=item[extra]></#if>
	        <option value="${itemValue}" <#if itemValue == value> selected="selected"</#if> <#if extra!=''>extra='${itemExtra}'</#if>>${itemTitle}</option>
	        </#list>
	    <#elseif list?is_hash&&!list?is_collection>
	        <#list list?exists?keys as key>
	            <#assign itemTitle=key>
	            <#assign itemValue=list[key]>
	        <option value="${itemValue}" <#if itemValue == value> selected="selected"</#if> >${itemTitle}</option>
	        </#list>
	    <#else>
	        <#list list?exists as item>
	            <#assign itemTitle=getText(item?string)>
	            <#assign itemValue=item>
	        <option value="${itemValue}" <#if itemValue == value> selected="selected"</#if> >${itemTitle}</option>
	        </#list>
	    </#if>
    </#if>
    </select>
   
    <script type="text/javascript">
    $(document).ready(function(){
    	var params={buttonClass: 'btn btn-white btn-primary',nonSelectedText:'请选择',numberDisplayed:6,enableCaseInsensitiveFiltering:<#if search>true<#else>false</#if><#if multi&&value!=''>,select:'${value}'</#if>,templates: {
					button: '<button type="button" class="multiselect dropdown-toggle" data-toggle="dropdown"></button>',
					ul: '<ul class="multiselect-container dropdown-menu"></ul>',
					filter: '<li class="multiselect-item filter"><div class="input-group"><span class="input-group-addon"><i class="fa fa-search"></i></span><input class="form-control multiselect-search" type="text"></div></li>',
					filterClearBtn: '<span class="input-group-btn"><button class="btn btn-default btn-white btn-grey multiselect-clear-filter" type="button"><i class="fa fa-times-circle red2"></i></button></span>',
					li: '<li><a href="javascript:void(0);"><label></label></a></li>',
					divider: '<li class="multiselect-item divider"></li>',
					liGroup: '<li class="multiselect-item group"><label class="multiselect-group"></label></li>'
				 }}
    	$('[name="${name}"]').multiselect(params);
    });
    	
    </script>
   
    
</#macro>

<#--
联动ajax下来选择框
    name            名称
    id              Id
    url             ajax的地址，如果是联动，则在url中应有[pid]的标签，自动替换对应的值
    value=''        默认选择的值，可以是数组
    pid=''          父选择框的Id
    class=''        样式表
    title=''        标题
    disabled=false  是否可用
    size=-1         同时选择的数量
    tabindex=-1     Tab键的顺序
-->
<#macro ajaxselect name id url value='' pid='' class='' title='' valueField='id' textField='text' style='' disabled=false size=-1 tabindex=-1 onChange='' checkType='' multi=false search=true>
    <select name="${name}" id="${id}"<#if multi> multiple="multiple" </#if> name="${name}"<#if id?exists && id!=''> id="${id}" </#if> <#if class?exists && class!=''> class="${class}<#if multi> multiselect</#if>"<#else>class="multiselect"</#if> <#if title?exists && title!=''> title="${title}"</#if><#if size gt 0> size="${size}"</#if> <#if style?exists && style!=''> style="${style}"</#if> <#if checkType?exists && checkType!=''> check-type="${checkType}"</#if> <#if disabled> disabled="disabled"</#if><#if tabindex gt 0> tabindex="${tabindex}"</#if> <#if onChange?exists && onChange!=''>onChange='${onChange}'</#if>></select>
    <script type="text/javascript">
    $(document).ready(function(){
    	var params={buttonClass: 'btn btn-white btn-primary',nonSelectedText:'请选择',numberDisplayed:6,enableCaseInsensitiveFiltering:<#if search>true<#else>false</#if><#if multi&&value!=''>,select:'${value}'</#if>,templates: {
					button: '<button type="button" class="multiselect dropdown-toggle" data-toggle="dropdown"></button>',
					ul: '<ul class="multiselect-container dropdown-menu"></ul>',
					filter: '<li class="multiselect-item filter"><div class="input-group"><span class="input-group-addon"><i class="fa fa-search"></i></span><input class="form-control multiselect-search" type="text"></div></li>',
					filterClearBtn: '<span class="input-group-btn"><button class="btn btn-default btn-white btn-grey multiselect-clear-filter" type="button"><i class="fa fa-times-circle red2"></i></button></span>',
					li: '<li><a href="javascript:void(0);"><label></label></a></li>',
					divider: '<li class="multiselect-item divider"></li>',
					liGroup: '<li class="multiselect-item group"><label class="multiselect-group"></label></li>'
				 }};
    	var url='${url}';
    	<#if pid?exists && pid!=''>
    	var $pid=$('#${pid}');
    	if($pid&&url.indexOf('[')>-1 && url.indexOf(']')>-1){
    		 $pid.change (function(){
                var reloadurl='${url}';
                var val = $('#${pid}').val();
                $('#${id}').html('');
                $('#${id}').multiselect(params);
                $('#${id}').multiselect('rebuild');
                if(val==null||val=='') return ;
                reloadurl = reloadurl.replace('[${pid}]',val);
                $('#${id}').multiselect(params);
			    $('#${id}').multiselect('rebuild');
                bfsu.ajaxSubmit({
					url:reloadurl,
			    	dataType:'json',
			    	onSuccess:function(data){
			    		var op = "<option value=''>请选择</option>";
			    		for(var i=0;i<data.length;i++){
				    		op += "<option value='"+data[i].${valueField}+"'>"+data[i].${textField}+"</option>";
			    		}
			    		$('#${id}').html(op);
						$('#${id}').multiselect(params);
			    		$('#${id}').multiselect('rebuild');
				    }
    			});
            });
            var val=$pid.val();
        	if(val!=null&&val!=''){
                url = url.replace('[${pid}]',val);
                bfsu.ajaxSubmit({
					url:url,
			    	dataType:'json',
			    	onSuccess:function(data){
			    		var op = "<option value=''></option>";
			    		for(var i=0;i<data.length;i++){
			    			if(data[i].${valueField}=='${value}'){
				    			op += "<option value='"+data[i].${valueField}+"' selected='selected'>"+data[i].${textField}+"</option>";
				    		}else{
				    			op += "<option value='"+data[i].${valueField}+"'>"+data[i].${textField}+"</option>";
				    		}
			    		}
			    		$('#${id}').html(op);
			    		$('#${id}').multiselect(params);
			    		$('#${id}').multiselect('rebuild');
		                
			    	}
    			});
                
            }
           
    	}
    	<#else>
		bfsu.ajaxSubmit({
				url:url,
		    	dataType:'json',
		    	onSuccess:function(data){
		    		var op = "<option value='' selected='selected'>请选择</option>";
		    		for(var i=0;i<data.length;i++){
		    			if(data[i].${valueField}=='${value}'){
			    			op += "<option value='"+data[i].${valueField}+"' selected='selected'>"+data[i].${textField}+"</option>";
			    		}else{
			    			op += "<option value='"+data[i].${valueField}+"'>"+data[i].${textField}+"</option>";
			    		}
		    		}
		    		$('#${id}').html(op);
               		$('#${id}').multiselect(params);
	    			$('#${id}').multiselect('rebuild');
		    	}
			});
    	</#if>
            
    });
    </script>
</#macro>

<#--
复选钮
    name                名称
    value               值
    checked=false       是否选中
    id=''               ID
    class=''            样式表
    title=''            提示信息
    disabled=false      不可用
    readonly=false      是否只读
    tabindex=-1         tab顺序
-->
<#macro checkbox name value='' checked=false id='' class='' style='' title='' readonly=false disabled=false tabindex=-1 >
   <div class='checkbox-inline'><label> <input type="checkbox" name="${name}" value="${value}" <#if checked?exists && checked> checked="checked"</#if><#if id?exists && id!=''> id="${id}"</#if><#if class?exists && class!=''> class="${class}"</#if><#if style?exists && style!=''> style="${style}"</#if><#if disabled> disabled="disabled"</#if><#if readonly> readonly="readonly"</#if><#if tabindex gt 0> tabindex="${tabindex}"</#if> ><#if title?exists && title!=''> ${title}</#if></label></div>
</#macro>

<#--
复选钮列表
    name                名称
    value               值
    list                集合
    listKey=''          选项内容对应的方法名
    listValue=''        选项的值对应的方法名
    fieldValue=''       选取的值
    class=''            样式表
    title=''            提示信息
    disabled=false      不可用
    readonly=false      是否只读
-->
<#macro checkboxlist name list value='' listKey='' listValue='' class=''  disabled=false readonly=false>
    <#if listKey?exists && listKey!='' && listValue?exists && listValue!=''>
    	<#if list?exists>
        <#list list as item>
       		<#assign itemTitle=item>
	    	<#list listKey?split('.') as k>
	    		<#assign itemTitle=itemTitle[k]>
	    	</#list>
            <#assign itemValue=item>
	    	<#list listValue?split('.') as k>
	    		<#assign itemValue=itemValue[k]>
	    	</#list>
            <#if value?exists && value?has_content>
                <#if value?is_enumerable>
                    <#assign checked=(value?seq_contains(itemValue))>
                <#else>
            	   <#assign checked=(value==itemValue)>
            	</#if>
            <#else>
                <#assign checked=false>
            </#if>
            <@checkbox name=name value=itemValue checked=checked id=(itemTitle+'_'+itemValue) class=class title=itemTitle readonly=readonly disabled=disabled /><label for="${itemTitle+'_'+itemValue}"></label>
        </#list>
        </#if>
    <#elseif list?is_hash && !list?is_collection>
    <#if list??>
        <#list list?keys as key>
            <#assign itemTitle=key>
            <#assign itemValue=list[key]>
            <#if value?exists && value?has_content>
                <#if value?is_enumerable>
                    <#assign checked=(value?seq_contains(itemValue))>
                <#else>
                   <#assign checked=(value==itemValue)>
                </#if>
            <#else>
                <#assign checked=false>
            </#if>
            <@checkbox name=name value=itemValue checked=checked id=(itemTitle+'_'+itemValue) class=class title=itemTitle readonly=readonly disabled=disabled /><label for="${itemTitle+'_'+itemValue}"></label>
        </#list>
        </#if>
    <#else>
        <#list list?exists as item>
            <#assign itemTitle=getText(item?string)>
            <#assign itemValue=item>
            <#if value?exists && value?has_content>
                <#if value?is_enumerable>
                    <#assign checked=(value?seq_contains(itemValue))>
                <#else>
                   <#assign checked=(value==itemValue)>
                </#if>
            <#else>
                <#assign checked=false>
            </#if>
            <@checkbox name=name value=itemValue checked=checked id=(itemTitle+'_'+itemValue) class=class title=itemTitle readonly=readonly disabled=disabled /><label for="${itemTitle+'_'+itemValue}"></label>
        </#list>
    </#if>
</#macro>

<#--
单选钮
    name                名称
    value               值
    list                集合
    listKey=''          选项内容对应的方法名
    listValue=''        选项的值对应的方法名
    fieldValue=''       选取的值
    class=''            样式表
    title=''            提示信息
    disabled=false      不可用
    readonly=false      是否只读
-->
<#macro radiobox name list value='' listKey='' style='' listValue='' class='' title='' disabled=false style='' readonly=false>
    <#if listKey?exists && listKey!='' && listValue?exists && listValue!=''>
        <#list list?exists as item>
            <#assign itemTitle=item[listKey]>
            <#assign itemValue=item[listValue]>
            <#if value?exists && value?has_content>
                <#if value?is_enumerable>
                    <#assign checked=(value?seq_contains(itemValue))>
                <#else>
                   <#assign checked=(value==itemValue)>
                </#if>
            <#else>
                <#assign checked=false>
            </#if>
            <div class='radio-inline' <#if style?exists && style!=''> style="${style}"</#if>><input type="radio" name="${name}" value="${itemValue}" id="${itemTitle+'_'+itemValue}" <#if checked> checked="checked"</#if><#if class?exists && class!=''> class="${class}"</#if><#if title?exists && title!=''> title="${getText(title)}"</#if><#if disabled> disabled="disabled"</#if><#if readonly> readonly="readonly"</#if> ><label for="${itemTitle+'_'+itemValue}">${getText(itemTitle)}</label></div>
        </#list>
    <#elseif list?is_hash_ex&&!list?is_collection>
        <#list list?exists?keys as key>
            <#assign itemTitle=key>
            <#assign itemValue=list[key]>
            <#if value?exists && value?has_content>
                <#if value?is_enumerable>
                    <#assign checked=(value?seq_contains(itemValue))>
                <#else>
                   <#assign checked=(value==itemValue)>
                </#if>
            <#else>
                <#assign checked=false>
            </#if>
            <div class='radio-inline' <#if style?exists && style!=''> style="${style}"</#if>><input type="radio" name="${name}" value="${itemValue}" id="${itemTitle+'_'+itemValue}" <#if checked> checked="checked"</#if><#if class?exists && class!=''> class="${class}"</#if><#if title?exists && title!=''> title="${getText(title)}"</#if><#if disabled> disabled="disabled"</#if><#if readonly> readonly="readonly"</#if> ><label for="${itemTitle+'_'+itemValue}">${getText(itemTitle)}</label></div>
        </#list>
    <#else>
        <#if list?exists && list?size gt 0 >
            <#list list as item>
                <#assign itemTitle=getText(item?c)>
                <#assign itemValue=item>
                <#if value?exists && value?has_content>
                    <#if value?is_enumerable>
                        <#assign checked=(value?seq_contains(itemValue))>
                    <#else>
                        <#if value?? && itemValue??>
                         <#assign checked=(value?string == itemValue?string)>
                        </#if>

                    </#if>
                <#else>
                    <#assign checked=false>
                </#if>
                <div class='radio-inline' <#if style?exists && style!=''> style="${style}"</#if>><input type="radio" checkbox name="${name}" value="${itemValue}" id="${itemTitle+'_'+itemValue}" <#if checked> checked="checked"</#if><#if class?exists && class!=''> class="${class}"</#if><<#if title?exists && title!=''> title="${getText(title)}"</#if><#if disabled> disabled="disabled"</#if><#if readonly> readonly="readonly"</#if> ><label for="${itemTitle+'_'+itemValue}">${getText(itemTitle)}</label></div>
            </#list>
        </#if>
    </#if>
</#macro>

<#--上传区宏-->
<#macro upload fileInfo="" id="default" type="" uploadPath="" datepath="true" callBackFunc="uploadCallBack" format="true" fileId="fileId" multiple='true' buttonText="上传文件">
    <div id="file-uploader-${id}" ></div>
    <input type="hidden" id="${type}" name="${type}" value="" />
    <script type="text/javascript">
        new qq.FileUploader({
                element: document.getElementById('file-uploader-${id}'),
                action: '${base}/components/fileupload/upload?path=${uploadPath}&datepath=${datepath}&format=${format}',
                deleteUrl:'${base}/components/fileupload/delete/',
                <#if callBackFunc?exists && callBackFunc!="">
                onComplete: function(id, fileName, responseJSON){
 					//${callBackFunc}(responseJSON.success,responseJSON.fileId);
 					if(responseJSON.success){
                        var fileId = $("#${type}").val();
                        $("#${type}").val(responseJSON.fileId+","+fileId);
 					}
                },
                </#if>
                multiple:${multiple},
                uploadButtonText:'${buttonText}',
                fileIdInputName:'${fileId}',
                <#if fileInfo?exists && fileInfo!="" && fileInfo.hasFiles>
                files:${fileInfo.fileInfos},
                </#if>
                debug: true
            });      
    </script>
</#macro>

<#--
判断页面权限，需配合权限组建使用
pcode 权限编码
fcode 功能编码
-->
<#macro sec pcode="" fcode="" >
<#if SecurityContext.hasFunction(Session[BfsuolConstants.SESSION_LOGININFO_KEY].roleCodes,pcode,fcode)>
<#nested>
</#if>
</#macro>

<#--
联动ajax下来树选择框
    name            名称
    id              Id
    url             ajax的地址，如果是联动，则在url中应有[pid]的标签，自动替换对应的值
    value=''        默认选择的值
    pid=''          父选择框的Id
    class=''        样式表
    title=''        标题
    disabled=false  是否可用
    size=-1         同时选择的数量
    tabindex=-1     Tab键的顺序
-->
<#macro ajaxtreeselect name id url value='' pid='' class='' title=''  style='' disabled=false size=-1 tabindex=-1 >
    <select name="${name}" id="${id}"<#if class?exists && class!=''> class="${class}"</#if><#if title?exists && title!=''> title="${title}"</#if><#if size gt 0> size="${size}"</#if> <#if style?exists && style!=''> style="${style}"</#if> <#if disabled> disabled="disabled"</#if><#if tabindex gt 0> tabindex="${tabindex}"</#if> date-options="panelHeight:'auto'"></select>
    <script type="text/javascript">
    $(document).ready(function(){
    	var url='${url}';
        if(url.indexOf('[')>-1 && url.indexOf(']')>-1){
        	
            var val = $('#${pid}').combobox('getValue');
            
            if(val){
                url = url.replace('[${pid}]',val);
                $('#${id}').combobox('clear');
                $('#${id}').combotree({  
                    url:url  
                }); 
                $('#${id}').combobox('enable',true);
            }else{
            	url = url.replace('[${pid}]',val);
            }
        }
    <#if pid?exists && pid!=''>
        
        
        var options =$('#${pid}').combobox('options');
        
        if(options){
            if(options.onSelect){
                options.onSelect = function(value,o){
                    if(value){
                        var reloadurl='${url}';
                        var val = $('#${pid}').combobox('getValue');
                        reloadurl = reloadurl.replace('[${pid}]',val);
                        $('#${id}').combobox('enable',true);
                        $('#${id}').combobox('reload',reloadurl);
                    }else{
                        $('#${id}').combobox('clear');
                        $('#${id}').combobox('enable',false);
                    }
                }
            }else{
                options.onSelect = function(value,o){
                    if(value){
                        var reloadurl='${url}';
                        var val = val=$('#${pid}').combobox('getValue');
					    
                        reloadurl = reloadurl.replace('[${pid}]',val);
                        $('#${id}').combobox('enable',true);
                        $('#${id}').combobox('reload',reloadurl);
                    }else{
                        $('#${id}').combobox('clear');
                        $('#${id}').combobox('enable',false);
                    }
                }
            }
        }
    </#if>
        $('#${id}').combotree({  
            url:url 
        });  

    });
    </script>
</#macro>

<#--截取字符串-->
<#macro cutstring str len=6>
	<#if str?exists && str?length gt len>
	<span class="tooltip-info" data-rel="tooltip" data-placement="top" title="" data-original-title="${str}">${str[0..(len-1)]?default("")}...</span>
	<script>
	$('[data-rel=tooltip]').tooltip();
	</script>
	<#else>${str?default("")}
	</#if> 
</#macro>
<#--
attrs 是数组 元素是key value 关于展示的属性
例 [{"name":"名称","value":"title"},{.....}]
	  名称:国家行政学院
	  .....
-->
<#macro tree list attrs listKey='' listValue='' checkbox=false >
	
    <#assign pid=''>
	<#if list?has_content && list?size gt 0>
		<table class="table table-hover tableTree">
			 <#list list?exists as item>
	            <#assign itemTitle=item[listKey]>
	            <#assign itemValue=item[listValue]>
	            <#assign levelTrack=item['levelTrack']>
				<#assign length=levelTrack?split(',')?size/>
				<#assign pIndex=item_index-1/>
				
	            <tr id='${itemValue}' class='' data-id=${itemValue}>
            		<td >
		            	<#if checkbox>
            				<input type="checkbox" value=${itemValue}/>
	    	        	</#if>
	    	        	&nbsp;&nbsp;<span  class="glyphicon glyphicon-chevron-down slideElement" style="cursor:pointer;"></span> &nbsp;${itemTitle}
    	        	</td>
	    	        	<#list attrs?exists as attr>
    	        			<td>
			    	        	&nbsp;&nbsp;${attr.name}:
			    	        	<#if item[attr.value] == null || item[attr.value] =="">
			    	        		暂无
	    	        			<#else>
				    	        	${item[attr.value]}
			    	        	</#if>
    	        			</td>
	    	        	</#list>
    	        	<td>
	    	        	&nbsp;&nbsp;<span  class="label label-primary cadd" style="cursor:pointer;" data-id=${itemValue} > 添加子结构 </span>
	    	        	&nbsp;&nbsp;<span  class="label label-primary cedit" style="cursor:pointer;" data-id=${itemValue} > 修改 </span>
	    	        	&nbsp;&nbsp;<span  class="label label-primary cdel" style="cursor:pointer;" data-id=${itemValue} > 删除 </span>
	    	        	&nbsp;&nbsp;<span  class="label label-primary cview" style="cursor:pointer;" data-id=${itemValue} > 查看 </span>
            		</td>
	            </tr>
	            <#if length != null>
	            	<script>
	            		$(function(){
	            			if(${length} == 1){
	            				$("#${itemValue}").addClass("p");
	            			}else{
	            				var $item = $('#${itemValue} td:eq(0)');
	            				for(i=0;i<${length} ;i++){
		            				$item.prepend("&nbsp;&nbsp;");
	            				}
	            				$("#${itemValue}").addClass("${levelTrack?split(',')[length-2]}");
	            			}
	            		});
	            	</script>
	            </#if>
	             <#assign pid=itemValue>
            </#list>
		</table>
	</#if>
	<script>
$(function(){
	$(".tableTree tr:not('.p')").hide();
	$(".tableTree tr.p").each(function(){
		hideIcon($(this).data("id"));		
	});
});

function hideIcon(classId){
	var $sunEle = $("."+classId);
	if($sunEle.length > 0){
		$sunEle.each(function(){
			hideIcon($(this).data("id"));
		});
	}else{
		$('#'+classId+" td span.slideElement").removeClass("glyphicon-chevron-up").removeClass("glyphicon-chevron-down").addClass("glyphicon glyphicon-minus");
	}
}

function hasSunEle(classId){
	if($('.'+classId).length > 0){
		return true;
	}
	return false;
}


$(".slideElement").click(function(){
	slideEle($(this));
});


//初始状态  glyphicon-chevron-down 收缩状态
//1、单击图标有class=glyphicon-chevron-down 子层级展开
//2、单击图标非（1）子层级收缩 判断子层级有没有子层级 有责收缩


function slideEle($this){
	var $p = $this.parent().parent();
	var dataId=$p.data("id");
	if(dataId != undefined){
		
		if($p.hasClass("p") && $this.hasClass("glyphicon-chevron-up")){
		
			$this.removeClass("glyphicon-chevron-up").addClass("glyphicon-chevron-down");
			$("."+dataId+" td span.slideElement").each(function(){
				$(this).removeClass("glyphicon-chevron-up")
				if(hasSunEle($(this).parent().parent().data("id"))){
					$(this).addClass("glyphicon-chevron-down");
				}
			});
			
			$("."+dataId).each(function(){
				$(this).stop(false,true).slideUp();
				$("."+$(this).data("id")).stop(false,true).slideUp();
			});
			
		}else if($this.hasClass("glyphicon-chevron-down")){
			$this.removeClass("glyphicon-chevron-down").addClass("glyphicon-chevron-up");
			$("."+dataId).stop(false,true).slideDown();
			
		}else{
			$this.removeClass("glyphicon-chevron-up");
			if(hasSunEle($p.data("id"))){
				$this.addClass("glyphicon-chevron-down");
			}
			$("."+dataId).stop(false,true).slideUp();
		}	
	}
}
</script>
</#macro>

<#macro short_btn type="default" size="" icon="" onclick="" disabled="" type="default" kind="large">
	<#if kind == "large" >
		<button type="button" class="btn btn-${type} <#if size != ''>btn-${size}</#if>" <#if onclick != ''>onclick="${onclick}"</#if><#if disabled != ''>disabled="${disabled}"</#if>>
			<@short_btn_pic icon=icon/>
			<#nested>
		</button>
	<#elseif kind == "mini"> 
		<span class="btn btn-${type} <#if size != ''>btn-${size}</#if>" <#if onclick != ''> onclick="${onclick}"</#if><#if disabled != ''> disabled="${disabled}"</#if>>
			<#nested>
		</span>
	<#else>
	</#if>
</#macro>

<#macro short_btn_pic icon=''>
	<#if icon != ''>
		<i class="ace-icon fa fa-${icon}"></i>
	</#if>
</#macro>

<#macro sidebar list listType='' listIcon='' listUrl='' id="sidebar-shortcuts">
	<#if list?has_content && list?size gt 0>
	<div class="sidebar-shortcuts" id="${id}">
		<div class="sidebar-shortcuts-large" id="${id}-large">
		 	<#if listType?exists && listType!='' && listIcon?exists && listIcon!='' && listUrl?exists && listUrl!=''>
				 <#list list?exists as item>
				  	<#assign itemType=item[listType]>
		            <#assign itemIcon=item[listIcon]>
		            <#assign itemUrl=item[listUrl]>
			 		<@short_btn kind="large" type=itemType icon=itemIcon onclick="menuClick('${itemUrl}')"/>
				 </#list>
			 </#if>
		</div>
		
		<div class="sidebar-shortcuts-mini" id="${id}-mini">
			<#if listType?exists && listType!='' && listIcon?exists && listIcon!='' && listUrl?exists && listUrl!=''>
				<#list list?exists as item>
				  	<#assign itemType=item[listType]>
		            <#assign itemUrl=item[listUrl]>
			 		<@short_btn kind="mini" type=itemType onclick="menuClick('${base}/${itemUrl}')"/>
				 </#list>
	  		</#if>
		</div>
	</div><!-- /.sidebar-shortcuts -->
	</#if>
</#macro>
<#macro menuItem>
	
</#macro>

<#macro leftMenu menu id="nav-list" class="nav nav-list">
	<ul class="${class}">

	<#if menu?has_content && menu?size gt 0>
		<#list menu?exists as item_level1>
			<#comment> 
				<!--根级项遍历 -->
			</#comment>
			<#if item_level1.subMenus?has_content && item_level1.subMenus?size gt 0 >
				<li class="">
					<a href="#" class="dropdown-toggle">
						<i class="menu-icon fa fa-desktop"></i>
								<span class="menu-text"> ${item_level1.title}</span>
						<b class="arrow fa fa-angle-down"></b>
					</a>
	
					<b class="arrow"></b>
					<ul class="submenu">
						<#list item_level1.subMenus?exists as item_level2>
							<#if item_level2.subMenus?has_content && item_level2.subMenus?size gt 0 >
								<li class="">
									<a href="#" class="dropdown-toggle">
										<i class="menu-icon fa fa-caret-right"></i>
											${item_level2.title}
										<b class="arrow fa fa-angle-down"></b>
									</a>
			
									<b class="arrow"></b>
								</li>
							<#else>
								<li class="">
									<a href="javascript:void(0);" data="${item_level2.url}" <#if item_level2.url>onclick="menuClick('${base}${item_level2.url}')"</#if>>
										<i class="menu-icon fa fa-caret-right"></i>
										${item_level2.title}
									</a>
									<b class="arrow"></b>
								</li>
							</#if>
						</#list>	
					</ul>
				</li>
			<#else>
				<li class="">
					<a href="javascript:void(0);"  data="${item_level1.url}" <#if item_level1.url>onclick="menuClick('${base}/${item_level1.url}')"</#if>>
						<i class="menu-icon fa fa-tachometer"></i>
							<span class="menu-text"> ${item_level1.title}</span>
					</a>
	
					<b class="arrow"></b>
				</li>
			</#if>
		 </#list>		 
	</#if>
	</ul>
<!-- #section:basics/sidebar.layout.minimize -->
<div class="sidebar-toggle sidebar-collapse" id="sidebar-collapse">
	<i class="ace-icon fa fa-angle-double-left" data-icon1="ace-icon fa fa-angle-double-left" data-icon2="ace-icon fa fa-angle-double-right"></i>
</div>
</#macro>

<#macro ace_footer>
	<div class="footer">
		<div class="footer-inner">
			<div class="footer-content">
				<span class="bigger">
					<span class="blue bolder">
						<a href="http://www.hulianboyuan.com" target="blank">互联博远</a>
					</span>
					项目管理系统 &copy; 2011-2012
				</span>

				<!--&nbsp; &nbsp;
				<span class="action-buttons">
					<a href="#">
						<i class="ace-icon fa fa-twitter-square light-blue bigger-150"></i>
					</a>

					<a href="#">
						<i class="ace-icon fa fa-facebook-square text-primary bigger-150"></i>
					</a>

					<a href="#">
						<i class="ace-icon fa fa-rss-square orange bigger-150"></i>
					</a>
				</span>
				-->
			</div>
		</div>
	</div>
</#macro>

<#macro ace_btn_up id="btn-scroll-up">
	<a href="#" id="${id}" class="btn-scroll-up btn btn-sm" style="font-size: 60px;">
		<i class="glyphicon glyphicon-plane bigger-350" style="color: rgb(0, 137, 255);z-index: 1100;"></i>
	</a>
</#macro>

<#macro nav navs...>
	<#assign navList=navs>
</#macro>
